﻿namespace SenGe.Domain
{
    /// <summary>
    /// 自定义属性
    /// </summary>
    internal class SenAttribute
    {
    }

    /// <summary>
    /// 自定义数据库表名称
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
    public class SenTableNameAttribute : Attribute
    {
        /// <summary>
        /// 数据库表名称
        /// </summary>
        public string Name { get; set; }
        public SenTableNameAttribute(string name)
        {
            this.Name = name;
        }
    }

    /// <summary>
    /// 标识数据字段是否在数据库操作时跳过
    /// </summary>
    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)]
    public class SenIgnoreAttribute : Attribute
    {
    }

    /// <summary>
    /// 标识数据字段对应数据库表主键
    /// 多主键时无效并采用默认Id
    /// </summary>
    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)]
    public class SenKeyAttribute : Attribute
    {
    }
}
